package com.qj.travel.service.impl;

import com.qj.travel.db.dao.VideoInfoDao;
import com.qj.travel.db.model.VideoInfoModel;
import com.qj.travel.service.VideoInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Admin on 2016/10/1.
 */
@Service
public class VideoInfoServiceImpl implements VideoInfoService {

    @Autowired
    private VideoInfoDao videoInfoDao;

    public List<VideoInfoModel> getVideoInfoList() {
        return videoInfoDao.getVideoInfoList();
    }

    public VideoInfoModel getVideoInfo(int videoId) {
        return videoInfoDao.getVideoInfo(videoId);
    }

    public int insertVideoInfo(VideoInfoModel videoInfoModel) {
        return videoInfoDao.insertVideoInfo(videoInfoModel);
    }

    public int updateVoteNum(int videoId, int voteNum) {
        return videoInfoDao.updateVoteNum(videoId, voteNum);
    }

    public List<VideoInfoModel> getVideoInfoListByPage(int startRow, int pageSize) {
        return videoInfoDao.getVideoInfoLisyByPage(startRow, pageSize);
    }

    public int updatePublish(int videoId) {
        return videoInfoDao.updatePublish(videoId);
    }

    public int cancelPublish(int videoId) {
        return videoInfoDao.cancelPublish(videoId);
    }

    public int deleteVideo(int videoId) {
        return videoInfoDao.deleteVideo(videoId);
    }

    public List<VideoInfoModel> getVideoBySort(String videoClass, int startRow, int pageSize) {
        return videoInfoDao.getVideoBySort(videoClass, startRow, pageSize);
    }

    public List<VideoInfoModel> getVideoPublished(int startRow, int pageSize) {
        return videoInfoDao.getVideoPublished(startRow, pageSize);
    }

    public List<VideoInfoModel> getVideoPublishedBySort(String videoClass, int startRow, int pageSize) {
        return videoInfoDao.getVideoPublishedBySort(videoClass, startRow, pageSize);
    }

    public int getVideoStatus(int videoId) {
        return videoInfoDao.getVideoStatus(videoId);
    }

    public int updateLock(int videoId) {
        return videoInfoDao.updateLock(videoId);
    }

    public int updateVideoInfo(int videoId, String videoName, String videoIntro, String videoClass) {
        return videoInfoDao.updateVideoInfo(videoId,videoName,videoIntro,videoClass);
    }

    public List<VideoInfoModel> getVideoNotPublished(int startRow, int pageSize) {
        return videoInfoDao.getVideoNotPublished(startRow,pageSize);
    }

    public List<VideoInfoModel> getVideoByUser(String userId) {
        return videoInfoDao.getVideoByUser(userId);
    }

    public List<VideoInfoModel> getVideoByUserPublished(String userId) {
        return videoInfoDao.getVideoByUserPublished(userId);
    }

    public List<VideoInfoModel> getVideoByUserNotPublished(String userId) {
        return videoInfoDao.getVideoByUserNotPublished(userId);
    }

    public int insertMessage(int videoId,String message) {
        return videoInfoDao.insertMessage(videoId,message);
    }

    public int updateNotPass(int videoId) {
        return videoInfoDao.updateNotPass(videoId);
    }

    public List<VideoInfoModel> getVideoByUserNotPass(String userId) {
        return videoInfoDao.getVideoByUserNotPass(userId);
    }

    public List<VideoInfoModel> getVideoNotPass() {
        return videoInfoDao.getVideoNotPass();
    }


}
